div(id="tasks")
	h3 Pending Tasks
	table
		tr
			th Name -id
			th Model
			th CaseId
			th Started
			th Action 
			th Assignee
			th Candidate Users
			th Candidate Groups
			th Due date
			th Follow-up date
			th Priority
		each item in waiting
			- var ref1 = "/invokeItem?id="+item.id+"&processName="+item.processName+"&elementId="+item.elementId;
			- var ref2 = "/assign?id="+item.id+"&processName="+item.processName+"&elementId="+item.elementId;

			tr
				td #{item.name} - #{item.elementId}
				td #{item.processName} 
				td #{item.data.caseId}
				td #{item.fromNow}
				td
					if (user.userName==item.assignee)  || user.isAdmin()
						a(href=`${ref1}`) Execute
						<br />
					a(href=`${ref2}`) Assign
				td #{item.assignee}
				if user && user.isAdmin()
					td #{item.candidateUsers}
					td #{item.candidateGroups}
				td #{item.dueFrom}
				td #{item.followFrom}
				td #{item.priority}
						


